<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@taglib prefix="mvc" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="fmt" uri="http://www.springframework.org/tags" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>新增报修</title>
    <link rel="stylesheet" href="/lib/layui/layui/css/layui.css?20190817.1">
    <link rel="stylesheet" href="/lib/layui/layui/css/common.css">
    <script src="/lib/layui/layui/layui.js"></script>
    <script type="text/javascript" src="/lib/layui/layui/global.js"></script>
    <script type="text/javascript" src="../../js/jquery/jquery-1.9.1.js"></script>
    <script src="../../js/base/base.js" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/layui/layui/js/baseCode/base.js?v=201908121454" type="text/javascript" charset="utf-8"></script>
    <script src="/lib/layui/layui/js/common.js?v=201907231346" type="text/javascript" charset="utf-8"></script>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .layui-card-header{
            border-bottom: 1px solid #eee;
        }
        .newTable{
            width: 80%;
            margin: 0 auto;
        }
        .layui-form .one{
            width: 100%;
            display: flex;
            flex-flow: row wrap;
            justify-content: space-around;
        }
        .layui-form-item{
            width: 48%;
        }
        .layui-inline{
            width: 40%;
            height: 38px;
        }
        .layui-form-label{
            width:64px;
        }
        .layui-input-block{

        }
        select{
            width: 100%;
            height: 38px;
        }
        input::-webkit-input-placeholder {
            color: #aab2bd;
        }
        .buttonbottom{
            text-align: center;
        }
        .buttonbottom button{
            background-color: #009284;
            width: 90px;
            margin-top: 30px;
        }
        .layui-treeSelect .ztree li span.button.root_open:before, .layui-treeSelect .ztree li span.button.root_close:before{
            content: "\e623";
        }
        .layui-form-selectup dl {
            top: 42px;
            bottom: unset;
        }
        .btnbox{
            position: relative;
            width: 100%;
            height: 40px;
            line-height: 40px;
        }
        #del{
            height: 30px;
            line-height: 30px;
            position: absolute;
            top: 5px;
            right: 510px;
        }
        #uploadButton{
            height: 30px;
            line-height: 30px;
            position: absolute;
            top: 5px;
            right: 710px;
        }
        /*.marleft{*/
        /*margin-right: 10px;*/
        /*}*/
        .faultTypes .layui-input{
            width: 184px;
        }
        .faultTypes .layui-select-tips{
            margin-left: -6px;
            width: 219px;
        }
        .ones.layui-select-title{
            margin-left: -20px;
        }
        .fieldHover:hover{
            background: #eeeeee;
        }
        .seeFild{
            padding:5px 10px 0 0;
        }
        .layui-btn{
            margin-left: 10px;
        }
        .types{
            width: 50%;
        }
        .marleft{
            margin-right: 2%;
        }
        #equipId{
            position:relative;
        }
        #add{
            position:absolute;
            right:0;
            top: 4px;
        }
        .faultStyles{
            width:70%;
            float:left;
        }
        .fault_information{
            margin-top:10px;
        }
        .fault_information .layui-form-item{
            width:25%;
        }
        .fault_information .layui-form-item .layui-input-block{
            margin-left: 87px;
            position:relative;
        }
        .fault_information .layui-form-item .layui-input-block span{
            float: left;
            padding:10px 0 0 5px;
        }
        .technicalParm{
            margin-left: 1%;
            width: 100%;
        }
        #fieldInfo{
            margin:0 0 10px 86px;
        }
        #equipName{
            width: 65%;
            float: left;
        }
        @media screen and (max-width:1024px) {
            .fault_information .layui-form-item{
                width:35%;
            }
            .technicalParm{
                width:83%;
            }
            #fieldInfo{
                margin:0 0 10px 135px;
            }
            #equipName{
                width: 55%;
            }
        }
    </style>
</head>
<body>
<div class="mbox">
    <div class="layui-card">
        <div class="layui-card-body">
            <form class="layui-form" lay-filter="formTest" style="width: 100%; margin: 0 auto;">
                <input type="text" name="equipId" style="display: none" id="layui-form">
                <div style="width: 100%;height:36px;line-height:36px;font-weight:bold;padding-left: 6px;background-color: #eeeeee">添加报修</div>
                <div class="one" style="padding-top: 20px;">
                    <div class="layui-form-item">
                        <label class="layui-form-label" style=""><span style="color: red;">*</span>报修部门</label>
                        <div class="layui-input-block" id="deptoper" style="width: 50%;">
                            <select name="borrowerdeptName" style="" id="borrowerdeptName" lay-filter="borrowerdeptName" class="borrowerdeptName deptId">
                                <option value="">请选择</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span style="color: red;">*</span>报修人</label>
                        <div class="layui-input-block types">
                            <input type="text" name="applicant" id="borrowerUser" placeholder="请输入" autocomplete="off" class="layui-input borrowerUser" disabled>
                        </div>
                    </div>
                </div>
                <div class="one">
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span style="color: red;">*</span>设备名称</label>
                        <div class="layui-input-block types" id="equipId" >
                            <input type="text" name="equipName" disabled placeholder="请选择" id="equipName" autocomplete="off" class="layui-input typename">
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="add" id="add">选择设备</button>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label" style="width: 84px;margin-left: -18px;">固定资产编号</label>
                        <div class="layui-input-block types">
                            <input type="text" name="equipNo" disabled placeholder="请输入" autocomplete="off" class="layui-input zichno">
                        </div>
                    </div>
                </div>
                <div class="one">
                    <div class="layui-form-item">
                        <label class="layui-form-label">设备类型</label>
                        <div class="layui-input-block types">
                            <input type="text" name="equipTypeName" disabled  placeholder="请输入" autocomplete="off" class="layui-input eqtype">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">出厂编号</label>
                        <div class="layui-input-block types">
                            <input type="text" name="factoryNo" disabled placeholder="请输入" autocomplete="off" class="layui-input chnum">
                        </div>
                    </div>
                </div>
                <div class="one">
                    <div class="layui-form-item">
                        <label class="layui-form-label">型号</label>
                        <div class="layui-input-block types">
                            <input type="text" name="modelNo" disabled  placeholder="请输入" autocomplete="off" class="layui-input model">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">规格</label>
                        <div class="layui-input-block types">
                            <input type="text" name="spec" disabled placeholder="请输入" autocomplete="off" class="layui-input spec">
                        </div>
                    </div>
                </div>
                <div id="eqba" style="width: 100%;height:36px;line-height:36px;font-weight:bold;padding-left: 6px;background-color: #eeeeee">故障信息</div>
                <div class="one fault_information">
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span style="color: red;">*</span>现象分类</label>
                        <div class="layui-input-block">
                            <div class="faultStyles">
                                <select name="faultType" id="faultType" class="faultTypes" >
                                    <option value="">请选择</option>
                                </select>
                                <span style="float: left;padding:10px 0 0 22px"></span>
                            </div>
                            <%--<input type="text" name="faultType" disabled  autocomplete="off" class="layui-input faultType" style="width:180px;float: left;">--%>
                            <span style="float: left;padding:10px 0 0 22px"></span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"><span style="color: red;">*</span>发生部位</label>
                        <div class="layui-input-block">
                            <input type="text" name="faultPosition" id="faultPosition" placeholder="请输入" autocomplete="off" class="layui-input faultPosition faultStyles">
                            <%--<input type="text" name="faultPosition" disabled autocomplete="off" class="layui-input faultPosition"style="width:180px;float: left;">--%>
                            <span style="float: left;padding:10px 0 0 44px"></span>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <label class="layui-form-label"><span style="color: red;">*</span>报修时间</label>
                        <div class="layui-input-block">
                            <input type="datetime" name="applicationTime" id="yzdata"  autocomplete="off"  class="layui-input applicationTime faultStyles"placeholder="请选择时间">
                            <%--<input type="text" name="applicationTime" disabled id="yzdata"  autocomplete="off"  class="layui-input applicationTime"  style="width:180px;float: left;">--%>
                            <span style="float: left;padding:10px 0 0 10px"></span>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label"></label>
                        <div class="layui-input-block">
                        </div>
                    </div>
                </div>
                <div class="one">
                    <div class="layui-form-item technicalParm">
                        <label class="layui-form-label" style="margin-left: -11px;"><span style="color: red;">*</span>故障描述</label>
                        <div class="layui-input-block">
                            <textarea name="faultDesc"  id="technicalParm" placeholder="请输入内容" class="layui-textarea faultDesc" style="height: 10px;margin-left: -27px;"></textarea>
                            <%--<textarea name="faultDesc" disabled  id="technicalParm" placeholder="请输入内容" class="layui-textarea faultDesc" style="height: 10px;margin-left: -27px;"></textarea>--%>
                        </div>
                    </div>
                </div>
                <div >
                    <div class="inbox layui-input-block" id="fieldInfo">
                        <button type="button" class="layui-btn" id="but_chose">
                            <i class="layui-icon">&#xe67c;</i>上传附件
                        </button>
                        <div id="attachmentName">

                        </div>
                    </div>
                </div>
                <div class="buttonbottom">
                    <button id="add-file-submit" class="layui-btn layui-btn-sm"lay-submit lay-filter="formDemo" style="display: none"></button>
                </div>
            </form>
        </div>
    </div>
</div>
<script>
    borrow="";
    var eqdata;
    var equipId;
    var opeation;   //定义判断编辑
    var equipmentId;   //选择设备表格的id
    var equippenter = parent.equipids   //调取父页面的下拉树id
    var typedata //定义的选择设备页面0数据表格的长度
    var filedata;
    var equipStatusCode;
    var factoryNo;
    var equipNo;
    var currdeptName;
    var fieldLength;
    function getQueryString(name){
        var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if(r!=null)return  unescape(r[2]); return null;
    }
    var parentDta=parent.trObj;
    var addbtn = getQueryString("addbtn");
    var editbtn =  getQueryString('editbtn')
    var deptId;
    var deptIds;
    var flval;
    layui.use(['form', 'layedit','table', 'laydate','element','treeSelect','upload'], function() {
        var form = layui.form
        var laydate = layui.laydate
        var table = layui.table;
        var layer = layui.layer;
        var upload = layui.upload;
        var $ = layui.jquery;
        $("#yzdata").val(nowformat);


        laydate.render({
            elem: '#yzdata'
            , trigger: 'click'//呼出事件改成click
            , format: 'yyyy-MM-dd'
        });

        laydate.render({
            elem: '#expectReturnDate'
            , trigger: 'click'//呼出事件改成click
            , format: 'yyyy-MM-dd'
        });
        form.on('select(borrowerdeptName)', function (data) {
            deptId = data.elem.value;
        });

        //上传图片
        fieldLength = $(".fieldHover").length;
        var uploadInst = upload.render({
            elem: '#but_chose' //绑定元素
            , url: '../upload?module=equipment'
            , accept: 'file'  //文件格式
            , auto: true
            , bindAction: '#uploadButton'
            , multiple: false
            , choose: function (obj) {   //选择文件的回调函数
                obj.preview(function (index, file) {
                    var i ="'attachId"+fieldLength+"'";
                    //$('#fileName').val(file.name);//显示文件名
                    var ht = "<div style='width: 400px;border-bottom: 1px solid darkgray;' class='layui-icon layui-icon-link fieldHover attachId"+fieldLength+"'><input type='hidden'  id='attachId"+fieldLength+"'> <label id='attachName"+fieldLength+"'></label> <a href="+'javascript:delFeled('+i+')'+" class='layui-icon-close' style='cursor: pointer;float:right;'></a></div>";
                    $("#fieldInfo").append(ht)
                    $('#attachName'+fieldLength).html(file.name);//显示文件名
                });
            }
            , done: function (res) {
                $("#attachId"+fieldLength).val(getAttachIds(res.obj[0]))
                ++fieldLength;
            }

        });
        //添加页面的ajax
        if (addbtn == 'add') {
            $.ajax({
                url: '/equipmentScrapping/showUserAndDept',
                type: 'post',
                dataType: 'json',
                success: function (res) {
                    $select = $("select[name='borrowerdeptName']")
                    var optionStr = ''
                    for (var i = 0; i < res.data[1].length; i++) {
                        var datass = res.data[1][i];
                        var deptName = datass.deptName;
                        deptIds = datass.deptId
                        if(deptName==res.data[0].deptName){
                            optionStr += '<option selected value="' + deptIds + '">' + deptName + '</option>'
                            deptId=deptIds;
                        }else{
                            optionStr += '<option  value="' + deptIds + '">' + deptName + '</option>'

                        }
                    }
                    $select.append(optionStr)
                    $('.borrowerUser').val(res.data[0].userName)
                    form.render('select');

                }
            })
            //渲染新增时 现象分类 ajax
            $.ajax({
                url: '/equipment/selectAllCommonCode?parentTyepNo=EQUIP_FAILURE'
                , type: 'post'
                , success: function (res) {
                    debugger
                    var fault = ''
                    for (var i = 0; i < res.data.length; i++) {
                        fault += '<option value="' + res.data[i].codeNo + '">' +  res.data[i].codeName + '</option>'
                    }
                    $('#faultType').append(fault)
                    form.render('select');
                }
            })

        }else if(editbtn=='edit'){
            opeation="edit";
            $.ajax({
                url:'/equipment/selectByReparlog',
                type:'post',
                dataType: 'json',
                data:{repalogId:parentDta.repalogId},
                success:function(res){
                    flval = res.data[0].faultType
                    currdeptName = res.data[0].deptName;
                    $('.borrowerUser').val(res.data[0].applicant)
                    form.val("formTest", res.data[0]);
                    //渲染编辑时 现象分类 ajax   flval现象分类
                    $.ajax({
                        url: '/equipment/selectAllCommonCode?parentTyepNo=EQUIP_FAILURE'
                        , type: 'post'
                        , success: function (res) {
                            var fault = ''
                            for (var i = 0; i < res.data.length; i++) {
                                if(flval== res.data[i].codeName){
                                    fault += '<option selected value="' + res.data[i].codeNo + '">' +  res.data[i].codeName + '</option>'
                                }else{
                                    fault += '<option value="' + res.data[i].codeNo + '">' +  res.data[i].codeName + '</option>'
                                }
                            }
                            $('.faultTypes').append(fault)
                            //$('.faultTypes').find('option[value="'+flval+'"]').prop('selected',true);
                            form.render('select');
                        }
                    })
                    //渲染报修部门下拉框
                    $.ajax({
                        url:'/equipmentScrapping/showUserAndDept',
                        type:'post',
                        dataType: 'json',
                        success:function (res) {
                            $select = $("select[name='borrowerdeptName']")
                            var optionStr = ''
                            for (var i = 0; i < res.data[1].length; i++) {
                                var datass = res.data[1][i];
                                var deptName = datass.deptName;
                                var deptId1 = datass.deptId
                                if(deptName==currdeptName){
                                    optionStr += '<option selected value="' + deptId1 + '">' + deptName + '</option>'
                                    deptId=deptId1;
                                }else{
                                    optionStr += '<option  value="' + deptId1 + '">' + deptName + '</option>'
                                }
                            }
                            $select.append(optionStr)
                            form.render('select');
                        }
                    })


                    $("#attachmentName").empty()
                    var attach = ""
                    for(var i=0;i<res.obj.limsEquipReparlogFiles.length;i++){
                        var attId = res.obj.limsEquipReparlogFiles[i].attachmentId;
                        var fileId = res.obj.limsEquipReparlogFiles[i].fileId
                        var repairId = res.data[0].repalogId;
                        var attName = res.obj.limsEquipReparlogFiles[i].attachmentName;
                        if(attId!=''&&attName!=''&&attId!=undefined&&attName!=undefined){
                            var attachIdArr = attId.split(',');
                            var attachNameArr = attName.split(',');
                            for(var j=0;j<attachIdArr.length;j++){
                                var attachId = "\""+attachIdArr[j]+"\"";
                                var repairId = repairId;
                                var fileidd = "\""+fileId+"\"";
                                var attachName = attachNameArr[j];
                                if(attachId!=''&&attachName!=''){
                                    attach+="<div id='fileId"+fileId+"' style='margin-left:10px;padding: 10px 0 10px 0'><label class='seeFild'>附件名称</label><label>"+attachName+"</label><button type='button' class='layui-btn layui-btn-sm' onclick='lookFile("+attachId+")'>查看</button><button type='button' class='layui-btn layui-btn-sm' onclick='downFile("+attachId+")'>下载</button><button type='button' class='layui-btn layui-btn-sm  layui-btn-danger' onclick='deleteFiel("+fileidd+")'>删除</button></div>"
                                }
                            }
                        }

                    }
                    $("#attachmentName").append(attach)
                }
            })

        }
        $("#uploadButton").click(function () {
            uploadInst.reload();
        })
        $('#add').click(function () {
            layer.open({
                type: 2 //此处以iframe举例
                , title: '选择设备'
                , area: ['100%', '100%']
                , maxmin: true
                , content: '/equipment/selectEquipair'
                , btn: ['确定', '取消']
                , yes: function (index, layero) {
                    layer.close(index);
                    equipId = $(layero).find("iframe")[0].contentWindow.equipId;
                    typedata =$(layero).find("iframe")[0].contentWindow.typedata;  //父页获取子页面的数据表格的变量
                    equipStatusCode =$(layero).find("iframe")[0].contentWindow.equipStatusCode;  //父页获取子页面的数据表格的变量
                    factoryNo =$(layero).find("iframe")[0].contentWindow.factoryNo;
                    equipNo =$(layero).find("iframe")[0].contentWindow.equipNo;
                    if(typedata.length==1){
                        layer.msg("只能选择一条数据提交");
                    }else{
                        $.ajax({
                            url: '/equipment/getEquipInfoByequipId'
                            , type: 'post'
                            , dataType: 'json'
                            , data: {equipId: equipId}
                            , success: function (res) {

                                eqdata = res.obj
                                equipmentId = eqdata.equipId
                                //回显添加经验的数据
                                $('.typename').val(eqdata.equipName)
                                $('.zichno').val(equipNo)
                                $('.model').val(eqdata.modelNo)
                                $('.spec').val(eqdata.spec);
                                $('.chnum').val(eqdata.factoryNo)
                                $('.eqtype').val(eqdata.equipTypeName)
                                //$('.equipStatusCode').val(equipStatusCode)
                                var fault = ''
                                var dataes = res.data;
                                for (var i = 0; i < dataes.length; i++) {
                                    fault += '<option value="' + dataes[i] + '">' + dataes[i] + '</option>'
                                }
                                $('.faultTypes').append(fault)
                                form.render('select');
                            }
                        })
                    }
                    layer.closeAll();
                }
            });
        })

        $('#del').click(function(){
            parent.closeend()
        })

    })

    function Xrborrow(bo) {
        $("#show").remove();
        $("#borrowerUser").html("<span id='show'>" + bo.userName + "</span>");
        $("#borrowerUser").next().val(bo.userId);
        $("#borrowerUser").next().attr("da-id",bo.userId);

    }

    function addjData() {
        var jsondata = layui.table.checkStatus('Settlement').data;
        return jsondata;
    }
    //将毫秒数转为yyyy-MM-dd格式时间
    function format(t) {
        var str = "";
        var nnow = new Date(t);
        var year = nnow.getFullYear();
        var month = nnow.getMonth() + 1;
        var day = nnow.getDate();
        str = year + "-" + month + "-" + day;
        return str;
    }
    //获取当前时间  年月日
    function nowformat() {
        var  nstr = "";
        var now = new Date();
        var nyear = now.getFullYear();
        var nmonth = now.getMonth()+1;
        var nday = now.getDate();
        if(nmonth<10){
            nmonth = "0"+nmonth;
        }
        if(nday<10){
            nday = "0"+nday;
        }
        nstr = nyear+"-"+nmonth+"-"+nday;
        return nstr;
    }

    function getRepairDate(){

        if($('#faultType').val()==''){
            document.getElementById("faultType").focus();
        }else if($('#faultPosition').val()==''){
            document.getElementById("faultPosition").focus();
        }else if($("#equipName").val()==''){
            document.getElementById("equipName").focus();
        }else if($("#technicalParm").val()==''){
            document.getElementById("technicalParm").focus();
        }else if($("#yzdata").val()==''){
            document.getElementById("yzdata").focus();
        }else if($("#borrowerdeptName").val()==''){
            document.getElementById("borrowerdeptName").focus();
        }else if($("#borrowerUser").val()==''){
            document.getElementById("borrowerUser").focus();
        }else{
            var experience = {};
            experience.equipName = $('.typename').val();
            experience.equipNo = equipNo;
            experience.equipTypeName = $('.eqtype').val();
            experience.factoryNo= factoryNo;
            experience.modelNo = $('.model').val();
            experience.spec = $('.spec').val();
            experience.faultType = $('.faultTypes').val();
            experience.atmosphereTemp = $('.atmosphereTemp').val();
            experience.atmosphereHumi = $('.humidity').val();
            experience.atmospherePress = $('.pressure').val();
            experience.voltage = $('.voltage').val();
            experience.resistance = $('.resistance').val();
            experience.waterPressure = $('.waterPressure').val();
            experience.pressure = $('.pressure').val();
            experience.faultPosition = $('.faultPosition').val();
            experience.applicationTime = $('.applicationTime').val();
            experience.faultDesc = $('.faultDesc').val();
            experience.deptId=$(".deptId").val()
            experience.waterTemp = $(".waterTemp").val()
            experience.repairStatus = 1
            experience.factoryNo =factoryNo;
            experience.equipNo =equipNo;
            experience.equipStatuasCode =equipStatusCode
            experience.equipId = equipmentId;
            experience.equipTypeId = equippenter      //下拉树的id
            experience.applicant = $(".borrowerUser").val()

            var attachId=""
            var attachName=""
            for(var i=0;i<fieldLength;i++){
                if($("#attachId"+i).val()!=''&&$("#attachId"+i).val()!=undefined&&$("#attachName"+i).text()!=''&&$("#attachName"+i).text()!=undefined){
                    attachId+= $("#attachId"+i).val()+","
                    attachName+=$("#attachName"+i).text()+","
                }else{
                    continue;
                }

            }
            experience.attachId=attachId
            experience.attachName=attachName
            //fieldLength
            // experience.attachName = attachName
            // experience.attachId =
            return experience;
        }

    }
    function delFeled(obj){
        $("#"+obj).val('');
        // $("."+obj).html('');
        $("."+obj).hide()
    }
    function lookFile(repalogId){//查看附件
        if (repalogId == undefined || repalogId == "") {
            layer.msg("文件已被损坏，无法查看");
        } else {
            selectFile(repalogId,'equipment');
            //window.location.href = "/equipment/limsDownload?model=" + model + "&attachId=" + attachId  下载
        }
    }
    function downFile(repalogId){//下载附件
        if (repalogId == undefined || repalogId == "") {
            layer.msg("文件已被损坏，无法下载");
        } else {
            //var equipmentRepair ="equipmentRepair"
            window.location.href = "/equipment/limsDownload?model=equipment&attachId=" +repalogId
        }
    }

    function deleteFiel(repalogId){//删除附件
        if (repalogId == undefined || repalogId == "") {
            layer.msg("文件不存在");
        } else {
            layer.confirm('确定要删除吗?', {icon: 3, title:'提示'}, function(index){
                $.post(
                    'deleteByPrimaryKey'
                    ,{fileId:repalogId},function(res){
                        if(res.code==0){
                            $("#fileId"+repalogId).hide()
                        }
                        layer.msg(res.msg)
                    }
                )
            })
        }
    }
</script>
</body>
</html>